package com.ruoyi.business.domain.excel;

import com.ruoyi.business.domain.BizUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelHandlerAdapter;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Workbook;

/**
 * <pre>
 *    description
 * </pre>
 *
 * @author zhangli
 * @version 1.0
 * @since 2025/10/14
 */
public class WeekNumExcelHandlerAdapter implements ExcelHandlerAdapter {

    @Override
    public Object format(Object value, String[] args, Cell cell, Workbook wb) {
        if (value != null && StringUtils.isNotEmpty((String) value)) {
            String str = (String) value;
            String substring = str.substring(1, str.length() - 1);
            return Integer.parseInt(substring);
        }
        return 0;
    }
}
